package com.ces.knacky.model;

import java.io.Serializable;
import java.util.Date;
import java.util.Set;

import javax.xml.bind.annotation.XmlTransient;

import org.apache.commons.lang.builder.EqualsBuilder;

import com.ces.knacky.framework.model.AbstractMasterEntity;

/** @author Hibernate CodeGenerator */
public class Company extends AbstractMasterEntity implements Serializable {

    /** persistent field */
    private String website;

    /** persistent field */
    private String summary;

    /** persistent field */
    private Set users;

    /** persistent field */
    private Set companyAddresses;

    /** persistent field */
    private Set items;

    /** persistent field */
    private Set brands;

    /** persistent field */
    private Set companyCategories;

    /** full constructor */
    public Company(String description, String website, String summary, Date updateTime, Date createTime, com.ces.knacky.model.Flag flag, com.ces.knacky.model.UserTable user, Set users, Set companyAddresses, Set items, Set brands, Set companyCategories) {
        this.description = description;
        this.website = website;
        this.summary = summary;
        this.updateTime = updateTime;
        this.createTime = createTime;
        this.flag = flag;
        this.user = user;
        this.users = users;
        this.companyAddresses = companyAddresses;
        this.items = items;
        this.brands = brands;
        this.companyCategories = companyCategories;
    }

    /** default constructor */
    public Company() {
    }

    /** minimal constructor */
    public Company(String description, String website, String summary, com.ces.knacky.model.Flag flag, com.ces.knacky.model.UserTable user, Set users, Set companyAddresses, Set items, Set brands, Set companyCategories) {
        this.description = description;
        this.website = website;
        this.summary = summary;
        this.flag = flag;
        this.user = user;
        this.users = users;
        this.companyAddresses = companyAddresses;
        this.items = items;
        this.brands = brands;
        this.companyCategories = companyCategories;
    }

    public String getWebsite() {
        return this.website;
    }

    public void setWebsite(String website) {
        this.website = website;
    }

    public String getSummary() {
        return this.summary;
    }

    public void setSummary(String summary) {
        this.summary = summary;
    }

    @XmlTransient
    public Set getUsers() {
        return this.users;
    }

    public void setUsers(Set users) {
        this.users = users;
    }

    @XmlTransient
    public Set getCompanyAddresses() {
        return this.companyAddresses;
    }

    public void setCompanyAddresses(Set companyAddresses) {
        this.companyAddresses = companyAddresses;
    }

    @XmlTransient
    public Set getItems() {
        return this.items;
    }

    public void setItems(Set items) {
        this.items = items;
    }
    
    @XmlTransient
    public Set getBrands() {
        return this.brands;
    }

    public void setBrands(Set brands) {
        this.brands = brands;
    }

    @XmlTransient
    public Set getCompanyCategories() {
        return this.companyCategories;
    }

    public void setCompanyCategories(Set companyCategories) {
        this.companyCategories = companyCategories;
    }

    public boolean equals(Object other) {
        if ( !(other instanceof Company) ) return false;
        Company castOther = (Company) other;
        return new EqualsBuilder()
            .append(this.getId(), castOther.getId())
            .isEquals();
    }
}
